package vn.kiemviec.app.utils;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

public class CollectionUtils {

	private CollectionUtils() {
	}

	public static boolean isEmpty(Collection<?> collections) {
		if (null == collections) {
			return true;
		}

		return collections.isEmpty();
	}

	public static boolean isEmpty(Object[] array) {
		if (null == array) {
			return true;
		}

		return array.length == 0;
	}

	public static List<String> repeat(String str, int repeatCount) {
		List<String> array = new ArrayList<String>();
		for (int i = 0; i < repeatCount; i++) {
			array.add(str);
		}
		return array;
	}
}
